package book;

/**
 * Created by cc
 * Description:
 * User: CZH
 * Date: 2022-09-24
 * Time: 13:54
 */
public class BookList {
    private int bookSize;
    private Book[] books = new Book[10];

    public BookList(){
        this.books[0] = new Book("校花的贴身高手","鱼人二代","199","网络小说");
        this.books[1] = new Book("盘龙","爱吃西红柿","89","网络小说");
        this.books[2] = new Book("三国演义","罗贯中","99.9","四大名著");
        this.books[3] = new Book("红楼梦","曹雪芹","99.9","四大名著");
        this.bookSize += 4;
    }

    public int getBookSize() {
        return bookSize;
    }
    public void setBookSize(int bookSize) {
        this.bookSize = bookSize;
    }

    //通过i获取图书信息
    public Book getPos(int i){
        return this.books[i];
    }

    //在pos位置插入图书信息
    public void setBooks(int pos, Book book){
        this.books[pos] = book;
    }
}
